package com.lzx.article.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lzx
 * @since 2023-01-11
 */
@Getter
@Setter
@ApiModel(value = "Articles对象", description = "")
public class ArticlesBrowse implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("博文id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("发表用户id")
    private Integer userId;

    @ApiModelProperty("博文标题")
    private String title;

    @ApiModelProperty("博文内容")
    private String content;

    @ApiModelProperty("浏览量")
    private Integer views;

    @ApiModelProperty("评论总数")
    private Integer commentCount;

    @ApiModelProperty("点赞数")
    private Integer likeCount;

    @ApiModelProperty("收藏量")
    private Integer collectCount;

    @ApiModelProperty("标签")
    private String label;

    //使用枚举ArticleGrade
    @ApiModelProperty("内容等级")
    private Integer grade;

    //使用枚举ArticleType
    @ApiModelProperty("发布形式")
    private Integer type;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @TableField(exist = false)
    private User user;

    //标签数组
    @ApiModelProperty("标签翻译")
    private String labels;

    @ApiModelProperty("逻辑删除")
    private Integer status;
}
